<html>
<head><meta charset="utf-8"><title>debug slow query · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html">debug slow query</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208048172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208048172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208048172">(Aug 26 2020 at 02:52)</a>:</h4>
<p>In general, how can I figure out which item a query is slow on? Is there a logging mode that prints queries and their keys?</p>



<a name="208048630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208048630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208048630">(Aug 26 2020 at 03:03)</a>:</h4>
<p>does <code>-Z self-profile</code> do what you want?</p>



<a name="208048638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208048638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208048638">(Aug 26 2020 at 03:03)</a>:</h4>
<p>or <code>-Z time-passes</code>?</p>



<a name="208048645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208048645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208048645">(Aug 26 2020 at 03:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span></p>



<a name="208048946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208048946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208048946">(Aug 26 2020 at 03:11)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> no, I've looked at those and know what query is slow, but I want to know what item it's processing when it's slow</p>



<a name="208049001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208049001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208049001">(Aug 26 2020 at 03:12)</a>:</h4>
<p>then the closest thing is probably <code>RUSTC_LOG=debug</code> and filter out the logging you're interested in :/</p>



<a name="208055698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/debug%20slow%20query/near/208055698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/debug.20slow.20query.html#208055698">(Aug 26 2020 at 06:05)</a>:</h4>
<p>You get what item if you run with <code>-Z self-profile -Z self-profile-events=default,query-keys</code> and then use crox to analyze the log</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>